#ifndef __HERO_H__
#define __HERO_H__

#include "cocos2d.h"
#include "cocostudio/CocoStudio.h"
#include "cocostudio/CCSSceneReader.h"
#include "ui/CocosGUI.h"
#include "cocostudio/ActionTimeline/CCActionTimeline.h"

using namespace cocostudio;
using namespace cocostudio::timeline;

class Hero : public cocos2d::Node
{
public:
	Hero();
	virtual ~Hero();

	static Hero* create(const cocos2d::Vec2 &pos);
	bool init(const cocos2d::Vec2 &pos);

	void setHeroHP(int hp);
	int getHeroHP();
	void setHeroSV(int sv);
	int getHeroSV();

	void dealCollisionWithEnemy(int hpDec);
	void heroDead(float delta = 1.0f);

	void attackStart();
	void hurtResponseCallback();
	void attackResponseCallback();
private:
	cocos2d::Node *m_pHeroNode;
	ActionTimeline *m_pHeroAction;
	cocos2d::PhysicsBody *m_pHeroBody;

	int m_iHP, m_iSV;
};


#endif